//
//  AAIMConfig.h
//  AAIM
//
//  Created by awh on 2019/11/22.
//  Copyright © 2019年 AAIM. All rights reserved.
//

#ifndef AAIMConfig_h
#define AAIMConfig_h
/*===============API服务器=====================*/
//正式
//#define MainURl  @"http://111.229.229.86:8081"
#define MainURl  @"http://index.gxyx.top"

//公众号
//#define PublicURl  @"http://111.229.229.86:8083"
#define PublicURl  @"http://ichat.gxyx.top"

//#define HeaderImageFileURL @"http://111.229.229.86:8082"
#define HeaderImageFileURL @"http://file.gxyx.top"

//#define voiceDownloadFileURL    @"http://111.229.229.86:8081/"
#define voiceDownloadFileURL    @"http://index.gxyx.top/"

/*===============Socket服务器=====================*/
// 正式服
#define kWebsocketSever    @"ws://150.109.145.76"  //

// 主色调（蓝色）

#define kMainColor  (@"4795EF")
// 红色
#define kRedColor   (@"ed222f")
// 黑色
#define kBlackColor (@"262B2F")
#define kGrayColor_66  (@"666666")
#define kGrayColor_99  (@"999999")
#define kGrayColor_b5  (@"b5b5b5")
#define kGrayColor_e8  (@"e8e8e8")
#define kGrayColor_f2  (@"f2f2f2")
// 绿色
#define kGreenColor    (@"2dc076")

// 默认头像
#define kHeadPlaceholderImage [UIImage imageNamed:@"bg_pyqtx"]
#define kHeadGroupPlaceholderImage [UIImage imageNamed:@"img_quntouxiang"]

//应用配置宏
//用户头像
#define userHeaderImage [[NSUserDefaults standardUserDefaults] objectForKey:@"userHeaderImage"]
//用户信息
#define userInfoImage  [[NSUserDefaults standardUserDefaults] objectForKey:@"userInfoImage"]
//客服二维码
#define kefuQRCode [[NSUserDefaults standardUserDefaults] objectForKey:@"kefuQRCode"]
//微信
#define kefuWechat [[NSUserDefaults standardUserDefaults] objectForKey:@"kefuWechat"]

/*****APPConfig 头像地址 二维码地址 客服名字头像 语音地址 聊天图片地址 是否验证码登录******/
#define LIFT_APP_USER_HEAD_KEY [CacheTool readUserDefaults:@"APP_USER_HEAD_KEY"]
#define LIFT_APP_USER_QR_KEY [CacheTool readUserDefaults:@"APP_USER_QR_KEY"]
#define LIFT_APP_USER_SERVICE_KEY [CacheTool readUserDefaults:@"APP_USER_SERVICE_KEY"]
#define LIFT_APP_USER_VOICE_KEY [CacheTool readUserDefaults:@"APP_USER_VOICE_KEY"]
#define LIFT_APP_USER_PIC_KEY [CacheTool readUserDefaults:@"APP_USER_PIC_KEY"]
#define LIFT_APP_USER_ISVCODE_KEY [CacheTool readUserDefaults:@"APP_USER_ISVCODE_KEY"]
#define LIFT_APP_USER_SOCKET_KEY [CacheTool readUserDefaults:@"APP_USER_SOCKET_KEY"]
#define LIFT_APP_USER_PORT_KEY [CacheTool readUserDefaults:@"APP_USER_PORT_KEY"]

//应用设置
//加我为好友，需要验证码 为1，不需要为0
#define checkFriends_id [[NSUserDefaults standardUserDefaults] objectForKey:[NSString stringWithFormat:@"checkFriends_%@",UserFuuid]]

//开启通讯录好友推荐为1，不需要为0
#define RecommendFriend_id [[NSUserDefaults standardUserDefaults] objectForKey:[NSString stringWithFormat:@"recommendFriends_%@",UserFuuid]]
//开启消息推送为1，不需要为0
#define PushMsg_id [[NSUserDefaults standardUserDefaults] objectForKey:[NSString stringWithFormat:@"pushMsg_%@",UserFuuid]]

#define UserFuuid [LoginManager shareLoginManager].userModel.fuuid



//临时token
#define TemToken [[NSUserDefaults standardUserDefaults] objectForKey:@"TemToken"]

// 颜色定义
#define kColor_LightGray [UIColor colorWithRed:245 / 255.0 green:245 / 255.0 blue:245 / 255.0 alpha:1.0]

#define kColor_Gray [UIColor colorWithRed:229 / 255.0 green:229 / 255.0 blue:229 / 255.0 alpha:1.0]

#define KRGBACOLOR(r,g,b,a) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:(a)]
#define KHEXCOLOR(c) [UIColor colorWithHexString:(c)]

#define AllBackColor (@"FFFFFF")
#define AllBackColor_bule (@"#4795EF")
#define AllBackColor_yellow (@"FFCB4F")
#define AllBackColor_red (@"ff6060")
#define AllBackColor_titleColor (@"#262B2F")
//分割线描边
#define IM_Color_SeparateLine (@"#E0E0E0")

// 尺寸定义

#define SCREEN_WIDTH [UIScreen mainScreen].bounds.size.width

#define SCREEN_HEIGHT [UIScreen mainScreen].bounds.size.height

#define STATUS_HEIGHT [[UIApplication sharedApplication] statusBarFrame].size.height

#define SCALAE SCREEN_WIDTH/375.0/2.0

#define IS_iPhoneX (\
{\
BOOL isPhoneX = NO;\
if (@available(iOS 11.0, *)) {\
isPhoneX = [[UIApplication sharedApplication] delegate].window.safeAreaInsets.bottom > 0.0;\
}\
(isPhoneX);}\
)
//6的比例适配
#define SCALAE_WIDTH(w) w*SCREEN_WIDTH/375.0
#define SCALAE_HEIGHT(w) h*667.0/375.0

//状态栏
#define kStatusBarHeight [[UIApplication sharedApplication] statusBarFrame].size.height
//导航栏
#define kNavBarHeight 44.0
//顶部高度
#define kTopHeight (kStatusBarHeight + kNavBarHeight)
//tabbar高度
#define kTabBarHeight ([[UIApplication sharedApplication] statusBarFrame].size.height>20.1?83.0:49.0)
//底部圆弧高度
#define kTabBarArcHeight ([[UIApplication sharedApplication] statusBarFrame].size.height>20.1?34.0:0.0)


//默认字体字号
#define kMainFont(n) [UIFont fontWithName:@"PingFangSC-Regular" size: n]
#define kFont(n) [UIFont fontWithName:@"PingFangSC-Medium" size:n]

// 是否为iphone6以下的机型
#define IS_IPHONE6_LOWER  ([[UIScreen mainScreen] bounds].size.height <= 667.0)

#define EMVIEWTOPMARGIN (IS_iPhoneX ? 22.f : 0.f)
#define EMVIEWBOTTOMMARGIN (IS_iPhoneX ? 34.f : 0.f)


//iphoneX
#define UI_IS_IPHONE_X          (SCREEN_WIDTH == 375.f && SCREEN_HEIGHT== 812.f? YES:NO)

#define   kDevice_Is_iPhoneX ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125, 2436), [[UIScreen mainScreen] currentMode].size) : NO)

#define    kDevice_Is_iPhone_XR ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(828, 1792), [[UIScreen mainScreen] currentMode].size) : NO)


#define    kDevice_Is_iPhone_Xs ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125, 2436), [[UIScreen mainScreen] currentMode].size) : NO)


#define    kDevice_Is_iPhone_Xs_Max ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1242, 2688), [[UIScreen mainScreen] currentMode].size) : NO)

#define NavigationBarHeight ((UI_IS_IPHONE_X==YES || kDevice_Is_iPhoneX==YES || kDevice_Is_iPhone_XR==YES ||kDevice_Is_iPhone_Xs == YES ||kDevice_Is_iPhone_Xs_Max ==YES)?88.f:64.f)


// 工具
#define USERCENTER_STORYBOARD [UIStoryboard storyboardWithName:@"UserCenter" bundle:nil]

#define WS(weakSelf)  __weak __typeof(&*self)weakSelf = self;

//日志打印
#ifdef DEBUG
#define AAIMLog(format,...) printf("%s",[[NSString stringWithFormat:(format), ##__VA_ARGS__] UTF8String])
#else
# define AAIMLog(...) /* */
#endif

#define KWeakSelf __weak __typeof(self)weakSelf = self

// 文件路径
#define kMessageImageFileName           @"BTMsg_Images"
#define kMessageVoiceFileName           @"BTMsg_Voice"
#define kMessageOfficeFileName          @"BTMsg_OfficeFile"
#define kAtDividedSymbols  @"AtDividedSymbols"
#define kAtAllSymbols      @"-9"

//系统通知
#define kMessageSystemCreateGroup           @"Lift_system_createGroup"
#define kMessageSystemAddFriends            @"Lift_system_addFriend"

//刷新首页会话通知
#define cChatRecordMessage             @"refreshHomeData"

#define kMessageSystemSetRedDot           @"Lift_system_SetRedDot"
#define kMessageSystemRemoveRedDot           @"Lift_system_removeRedDot"

#endif /* AAIMConfig_h */
